package com.chenpp.netty.tomcat.http;

/**
 * 2020/3/9
 * created by chenpp
 */
public abstract class CPHttpServlet {

    public void service(CPRequest request,CPResponse response){
        if("GET".equalsIgnoreCase(request.getMethod())){
            doGet(request,response);
        }else {
            doPost(request,response);
        }

    }

    public abstract  void doGet(CPRequest request,CPResponse response);

    public abstract  void doPost(CPRequest request,CPResponse response);

}
